<?php
/*
 * Created on Nov 23, 2007
 * File: CompileDoctrine.php
 * Project: BIMP
 * Author: jerrad
 */
 
  //require the includes php file one directory up
 require_once(dirname(dirname(__FILE__)). DIRECTORY_SEPARATOR ."includes.php");
 //require the include file two directories up
 //require_once(dirname(dirname(dirname(__FILE__))).  DIRECTORY_SEPARATOR . "includes.php");
 
function __autoload($class_name) {

      if($exists = !class_exists($class_name) && file_exists($class = CLASS_PATH.$class_name.'.php')){
        require_once $class;
        }
   	  elseif(!$exists) {
        eval('class '.$class_name.' extends Exception {}');
        throw new $class_name('[__autoload] this file doesn\'t exists: '.$class);
   	 }
}

// Get the path to your Doctrine libraries
$path = Doctrine::getPath();
var_dump($path);
// Compile doctrine in to a single php file
$drivers = array('mysql'); // specify the array of drivers you want to include in this compiled version
Doctrine::compile(dirname(__FILE__), $drivers); 
 
?>
